/* Define to prevent recursive inclusion -------------------------------------*/
/* This preprocessor directive creates an include guard to prevent multiple */
/* inclusions of the same header file during compilation, which would cause */
/* redefinition errors and compilation failures in the build process */
#ifndef __MODEM_H
#define __MODEM_H

/* Standard integer type inclusion for portable fixed-width integer definitions */
/* Provides uint8_t, uint16_t, etc. for consistent data type sizing across */
/* different platforms and compiler implementations */
#include <stdint.h>

/* Mathematical function library inclusion for advanced signal processing */
/* Required for mathematical operations such as signal strength calculations, */
/* logarithmic conversions, and other numerical processing tasks related to */
/* modem signal analysis and network quality measurements */
#include <math.h>

/**
 * @brief System command path for initiating cellular dialer connection
 * This constant defines the full filesystem path to the shell script or
 * executable responsible for establishing the cellular data connection
 * through the PPP (Point-to-Point Protocol) dialing process
 */
#define DIALER_START "/etc/init.d/remotedial start"

/**
 * @brief System command path for terminating cellular dialer connection
 * This constant defines the full filesystem path to the shell script or
 * executable responsible for gracefully shutting down the cellular data
 * connection and releasing network resources
 */
#define DIALER_STOP "/etc/init.d/remotedial stop"

/**
 * @brief Device file path for first LTE modem serial interface
 * This constant specifies the character device file in the /dev directory
 * that represents the serial communication interface to the primary LTE
 * cellular modem for data transmission and reception
 */
#define PORT_PPP0 "/dev/LTE1"

/**
 * @brief Device file path for second LTE modem serial interface
 * This constant specifies the character device file in the /dev directory
 * that represents the serial communication interface to the secondary LTE
 * cellular modem, providing redundancy or additional bandwidth capacity
 */
#define PORT_PPP1 "/dev/LTE2"

/**
 * @brief Initialize and establish cellular data connection
 * This function executes the dialer startup procedure to establish a
 * cellular data connection using the Point-to-Point Protocol (PPP)
 * @return uint8_t Returns TRUE if dialer startup sequence completed
 *                 successfully and connection establishment was initiated,
 *                 FALSE if any step in the startup process failed or if
 *                 the modem hardware is unresponsive
 */
extern uint8_t wwwan_dialer_start(void);

/**
 * @brief Terminate cellular data connection and cleanup resources
 * This function executes the dialer shutdown procedure to gracefully
 * disconnect the cellular data connection and release all associated
 * network resources and system handles
 * @return uint8_t Returns TRUE if dialer shutdown sequence completed
 *                 successfully and connection termination was confirmed,
 *                 FALSE if the shutdown process encountered errors or
 *                 if the connection could not be properly closed
 */
extern uint8_t wwwan_dialer_stop(void);

/**
 * @brief Retrieve and display comprehensive modem status information
 * This function queries the specified cellular modem for detailed status
 * information including signal strength, network registration, carrier
 * information, and hardware identification data
 * @param dev: Character pointer specifying the target modem device to query
 *             Must be a valid device identifier such as "ppp0" or "ppp1"
 *             corresponding to the configured modem interfaces
 * @return uint8_t Returns TRUE if modem status information was successfully
 *                 retrieved and displayed, FALSE if the specified device
 *                 is invalid, unresponsive, or if communication errors
 *                 occurred during the query process
 */
extern uint8_t wwan_modem_showMsg(char *dev);

#endif /* __MODEM_H */